/*
 * Copyright (C) 2009 Kristopher T Babic
 *
 * This program is free software; you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, see <http://www.gnu.org/licenses>.
 */
/**
 *
 * @author Kristopher T Babic
 */

package edu.idp.client;

import edu.idp.shared.utils.Convert;

import java.awt.*;

/**
 *
 * @author Kristopher T Babic
 */
public final class DrawType {

    public static final int FREEHAND = 0;
    public static final int LINE = 1;
    public static final int ELLIPSE = 2;
    public static final int RECTANGLE = 3;
    public static final int ANIMATED = 4;
    public static final int AIRBRUSH = 5;

    public static long getDate(String in) {
        return Convert.toLong(in.substring(4, 8));
    }

    public static long getDeath(String in) {
        return Convert.toLong(in.substring(8, 12));
    }

    public static Color getColor(String in) {
        return new Color(Convert.toInt(in.substring(2, 4)));
    }

    public static int getType(String in) {
        return Convert.toInt(in.substring(0, 2));
    }

    public static String getExtra(String in) {
        return in.substring(12, in.length());
    }

}